package com.sright.bcard.cms.controller.enterprise.apply;

import com.sright.bcard.common.service.share.excel.annotation.ExcelColumn;
import com.sright.bcard.common.service.share.dto.content.MessageDTO;
import lombok.Data;

import java.io.Serializable;

@Data
public class MessageExportInfo implements Serializable {

    @ExcelColumn(name = "公司", column = "A")
    private String company;

    @ExcelColumn(name = "联系人姓名", column = "B")
    private String contacts;

    @ExcelColumn(name = "职位", column = "C")
    private String job;

    @ExcelColumn(name = "手机号", column = "D")
    private String mobile;


    @ExcelColumn(name = "推荐人", column = "E")
    private String recommender;

    @ExcelColumn(name = "来源", column = "F")
    private String source;

    @ExcelColumn(name = "开通意向", column = "G")
    private String openStatus;

    @ExcelColumn(name = "是否开通", column = "H")
    private String isOpening;

    @ExcelColumn(name = "申请时间", column = "I")
    private String createDate;

    @ExcelColumn(name = "备注", column = "J")
    private String note;

    public static MessageExportInfo getInstance(MessageDTO messageDTO) {
        MessageExportInfo messageExportInfo = new MessageExportInfo();
        messageExportInfo.setCompany(messageDTO.getCompany());
        messageExportInfo.setContacts(messageDTO.getName());
        messageExportInfo.setJob(messageDTO.getJob());
        messageExportInfo.setMobile(messageDTO.getMobile());
        messageExportInfo.setRecommender(messageDTO.getReferrer());
        messageExportInfo.setSource(messageDTO.strOfSource());
        messageExportInfo.setOpenStatus(messageDTO.strOfopenStatus());
        messageExportInfo.setCreateDate(messageDTO.strOfCreateDate());
        messageExportInfo.setNote(messageDTO.getContent());
        return messageExportInfo;
    }
}
